<?php
session_start();
require_once('../config.php'); // config.php在根目录下
require_once( ROOT.'includes/db.php');
require_once( ROOT.'includes/user.php');
require_once( ROOT.'includes/profile.php');//add|edit profiles

$master_id = $_GET['mid'];
$pet_profiles = getPets($master_id);//get all pets for this master
foreach ($pet_profiles as $pet) {
	//把这个人的宠物列出来，每个链接（按钮）分别打开一个宠物主页
	//$home_url = './home.php?mid='.$master_id.'&pid='.$pet['id'];
	?>	
	<form action="home.php" method="post">
		<input type="hidden" name="mid" value="<?php echo $master_id ?>" />
		<input type="hidden" name="pid" value="<?php echo $pet['id']?>" />
		<input type="submit" value="<?php echo $pet['name']; ?>" />
	</form>
	<?php
}
?>